<template>
  <div class="container">
    <div class="main">
      <!-- 食谱大全 -->
      <div class="select-box">
        <el-input v-model="selectkey" placeholder="搜索食谱 例：土豆 鸡蛋">
          <el-button slot="append" @click="goSelect()">搜索</el-button>
        </el-input>
      </div>
      <el-tabs v-model="filter.activeName">
        <el-tab-pane label="热门推荐" name="first">
          <shipu-list :list="list" :type="1"></shipu-list
        ></el-tab-pane>
        <el-tab-pane label="最新发布" name="second">
          <shipu-list :list="list" :type="1"></shipu-list
        ></el-tab-pane>
        <el-tab-pane label="本周最热" name="third">
          <shipu-list :list="list" :type="1"></shipu-list
        ></el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import ShipuList from "./ShipuList.vue";

export default {
  data() {
    return {
      filter: {
        activeName: "first",
      },
      selectkey: "hahahaha",
      list: [1, 2, 3, 4,5,6,7,8,9,10,11,12,13,45],
    };
  },
  methods: {
    goSelect() {
      this.$router.push("/shipu/select/" + this.selectkey);
    },
  },
  components: { ShipuList },
};
</script>

<style lang="less" scoped>
.main {
  .el-tabs {
    width: 960px;
    margin: 0 auto;
  }
  .select-box {
    margin: 20px auto;
    width: 960px;
    .el-button {
      width: 160px;
    }
  }
}
</style>

